package Test_0807;

/**
 * Created with Intellij IDEA
 * Description:
 * User: 星辰
 * Dare: 2024-08-07
 * Time: 21:27
 */
interface IA{
    void a();
}
interface IB{
    void b();
}
interface IC extends IA,IB{
    void c();
}
class ID implements IC {
    @Override
    public void a() {

    }

    @Override
    public void b() {

    }

    @Override
    public void c() {

    }
}
public class Test {
    public static void fun(Animal animal){
        animal.eat();
    }
    public static void run(IRun iRun){
        iRun.run();
    }
    public static void fly(IFly iFly){
      iFly.fly();
    }

    public static void main(String[] args) {
        Dog dog1=new Dog("小白",2);
        Dog dog2=new Dog("小白",2);
       /* System.out.println(dog1==dog2);
        System.out.println(dog1.equals(dog2));*/
       /* System.out.println(dog1.hashCode());
        System.out.println(dog2.hashCode());*/
        System.out.println(dog1.toString());
    }
    public static void main4(String[] args) {
        int a=2;
        int b=2;
        System.out.println(a==b);


    }
    public static void main3(String[] args) {
        Object obj1=new Cat("mimi",3);
    }
    public static void main2(String[] args) {
        run(new Dog("小白",2));
        run(new Cat("mimi",3));
        fly(new Duck("丫丫",1));
        run(new Duck("丫丫",1));
    }
    public static void main1(String[] args) {
        fun(new Dog("小白",2));
        fun(new Cat("mimi",3));
        fun(new Duck("丫丫",1));
    }
}
